<template>
  <div>
    <ul>
      <li>欢迎光临_vue开发的收银系统_水果店</li>
      <li>苹果10元/斤,折扣8折.</li>
      <li>请输入你要购买的斤数 <input type="text" v-model="money" /></li>
      <li><button @click="fnd">结账买单</button></li>
      <li>
        结账账单:总价<span>{{ Check }}</span
        >元,折后<span>{{ Check2 }}</span
        >元,省了<span>{{ Check3 }}</span
        >元.
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      money: null,
      Check: 0,
      Check2: 0,
      Check3: 0,
    };
  },
  methods: {
    fnd() {
      this.Check = this.money * 10;
      this.Check2 = this.Check * 0.8;
      this.Check3 = this.Check - this.Check2;
    },
  },
};
</script>

<style>
</style>